Skip to content

[Gtk4] Clip Composite children to parent bounds#3324

Merged
akurtakov merged 2 commits into
eclipse-platform:masterfrom
akurtakov:overdraw
May 30, 2026
Merged

[Gtk4] Clip Composite children to parent bounds#3324
akurtakov merged 2 commits into
eclipse-platform:masterfrom
akurtakov:overdraw

Conversation

@akurtakov
Copy link
Copy Markdown
Member

In GTK3, calling gtk_widget_set_has_window(true) on a SwtFixed widget created a backing GdkWindow that automatically clipped all child widgets to the parent's allocated rectangle. GTK4 removed per-widget GdkWindows,
so children render freely beyond the parent by default (GTK_OVERFLOW_VISIBLE), causing custom-drawn widgets such as CTabFolder to let their content controls draw completely outside the folder bounds.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

Test Results (linux)

   94 files  ±0     94 suites  ±0   14m 21s ⏱️ -14s
4 597 tests ±0  4 373 ✅ ±0  224 💤 ±0  0 ❌ ±0 
3 383 runs  ±0  3 308 ✅ ±0   75 💤 ±0  0 ❌ ±0 

Results for commit 5e4bbb2. ± Comparison against base commit 1ac0cbf.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

@jonahgraham jonahgraham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved (for when master reopens) - address the nit if you agree.

Comment thread bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java Outdated
akurtakov and others added 2 commits May 30, 2026 09:34
In GTK3, calling gtk_widget_set_has_window(true) on a SwtFixed widget
created a backing GdkWindow that automatically clipped all child widgets
to the parent's allocated rectangle.  GTK4 removed per-widget
GdkWindows,
so children render freely beyond the parent by default
(GTK_OVERFLOW_VISIBLE), causing custom-drawn widgets such as CTabFolder
to let their content controls draw completely outside the folder bounds.
Co-authored-by: Jonah Graham <jonah@kichwacoders.com>
@akurtakov akurtakov merged commit 7613625 into eclipse-platform:master May 30, 2026
20 checks passed
@akurtakov akurtakov deleted the overdraw branch May 30, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants